package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.SysCompanyClassification;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysExpertCategoryMapper;
import com.ruoyi.system.domain.SysExpertCategory;
import com.ruoyi.system.service.ISysExpertCategoryService;

/**
 * 专家品目Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-30
 */
@Service
public class SysExpertCategoryServiceImpl implements ISysExpertCategoryService 
{
    @Autowired
    private SysExpertCategoryMapper sysExpertCategoryMapper;

    /**
     * 查询专家品目
     * 
     * @param id 专家品目主键
     * @return 专家品目
     */
    @Override
    public SysExpertCategory selectSysExpertCategoryById(Long id)
    {
        return sysExpertCategoryMapper.selectSysExpertCategoryById(id);
    }

    /**
     * 查询专家品目列表
     * 
     * @param sysExpertCategory 专家品目
     * @return 专家品目
     */
    @Override
    public List<SysExpertCategory> selectSysExpertCategoryList(SysExpertCategory sysExpertCategory)
    {
        return sysExpertCategoryMapper.selectSysExpertCategoryList(sysExpertCategory);
    }

    /**
     * 新增专家品目
     * 
     * @param sysExpertCategory 专家品目
     * @return 结果
     */
    @Override
    public int insertSysExpertCategory(SysExpertCategory sysExpertCategory)
    {
        sysExpertCategory.setCreateTime(DateUtils.getNowDate());
        return sysExpertCategoryMapper.insertSysExpertCategory(sysExpertCategory);
    }

    /**
     * 修改专家品目
     * 
     * @param sysExpertCategory 专家品目
     * @return 结果
     */
    @Override
    public int updateSysExpertCategory(SysExpertCategory sysExpertCategory)
    {
        sysExpertCategory.setUpdateTime(DateUtils.getNowDate());
        return sysExpertCategoryMapper.updateSysExpertCategory(sysExpertCategory);
    }

    /**
     * 批量删除专家品目
     * 
     * @param ids 需要删除的专家品目主键
     * @return 结果
     */
    @Override
    public int deleteSysExpertCategoryByIds(Long[] ids)
    {
        return sysExpertCategoryMapper.deleteSysExpertCategoryByIds(ids);
    }

    /**
     * 删除专家品目信息
     * 
     * @param id 专家品目主键
     * @return 结果
     */
    @Override
    public int deleteSysExpertCategoryById(Long id)
    {
        return sysExpertCategoryMapper.deleteSysExpertCategoryById(id);
    }

    /**
     * 修改专家品目状态
     *
     * @param sysExpertCategory 专家品目信息
     * @return 结果
     */
    @Override
    public int updateSysExpertCategorynStatus(SysExpertCategory sysExpertCategory)
    {
        return sysExpertCategoryMapper.updateSysExpertCategory(sysExpertCategory);
    }
}
